package com.kurt.entity;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 组织扩展表
 * 存储组织的额外信息，如组织编码、类型、负责人、联系方式、地址、描述等
 * 与sys_organization表一对一关联
 */
@Data
@Entity
@Table(name = "sys_organization_extension")
@EqualsAndHashCode(callSuper = true)
public class SysOrganizationExtension extends BaseEntity {

    @Id
    @Column(name = "id")
    private Long id; // 组织ID，与sys_organization.id一致

    @Column(name = "code", length = 50)
    private String code; // 组织编码

    @Column(name = "type", length = 20)
    private String type; // 组织类型(company,department,team)

    @Column(name = "manager_id")
    private Long managerId; // 负责人ID

    @Column(name = "phone", length = 20)
    private String phone; // 联系电话

    @Column(name = "email", length = 100)
    private String email; // 邮箱

    @Column(name = "address", length = 255)
    private String address; // 地址

    @Column(name = "description", columnDefinition = "TEXT")
    private String description; // 组织描述

    @Column(name = "custom_field1", length = 255)
    private String customField1; // 自定义字段1

    @Column(name = "custom_field2", length = 255)
    private String customField2; // 自定义字段2

    @Column(name = "custom_field3", length = 255)
    private String customField3; // 自定义字段3

}
